Designers > K2 Designer for Visual Studio > Design Tools > Toolbox > Working with Rules > Destination Rule > Destination Rule-Destination Rule Options [Continued] | Send feedback |
The second Destination Rule Options screen is used to configure the behavior of a destination rule. The wizard screen is used to configure the slots and roles of the destinations. The second Destination Rule Options screen is context sensitive and will display different fields depending on the type of option selected in the first Destination Rule Options screen.
It is Best Practice to always have at least as many destinations as there are slots |
After selecting Plan just once or Plan per destination on the previous screen the following screen will be displayed:
Fig.1 Default Activity Wizard - Destination Rule Options wizard screen
When the destination rule consists out of roles or groups as destinations, the server will resolve these roles and groups to individual users. When the Create a slot for each destination option is selected, the server will create a required slot for each destination user that is contained in the role or group. If this option is checked, the count will be adjusted to the amount of Destinations added in the destination Rule. This count can be influenced by the Resolve all Group/Role to users setting. If a user and group is added and the Resolve setting is true, the Group will be resolved to 3 users for example. The Slot count will equal 4 in total. So if you are using the Plan per Destination option, there will be 4 Activity Instance Destinations created.
When the Specify the number of slots to be created option is selected, a fixed amount of slots will be created.
Resolve all roles and groups to users is done during activity execution and determines whether the Roles and Groups should be brought down to the user level, and that each user should be added as a Destination instead of the Role/Group being the Destination itself. Resolving a Role/Group makes the Destinations static and will not change in the lifetime of the Activity Instance. All events execute once for each member of the Role/Group.
When selecting Create a slot for each role and group, the role is not resolved and a single activity instance is created. The role receives rights and all members of the role can access the task.
When the Keep roles synchronized check box is selected, the server will automatically synchronize roles when users are added and/or removed. The Activity Instance will react, by adjusting the slots (if slot per destination is selected), Create new or Expire Activity Instance Destinations (if the plan option is Plan per destination). In the case of Plan Just Once, only the slots will be adjusted to keep the Succeeding Rule in sync (All Slots=Completed).
If the check box is not selected the roles and groups will be resolved only once. Adding and/or removing users from roles will therefore not be synchronized.
Feature | Description | How to use it |
---|---|---|
Create a slot for each destination | Will create a slot for each destination user enabling all destination users listed to interact and action the Client event. This option is not advised for large destination user lists and groups as there is high load on the system. | Select the check box to select this option if relevant |
Specify the number of slots to be created | Will create the specified number of slots enabling destination users to interact and action the Client event. This option is more efficient and establishes a destination user to slot ratio | Select the check box to select this option if relevant and specify the number of slots in the supplied text box |
Resolve all roles and groups to users | Specifies that all roles and groups should be resolved to users | Select how the roles should be treated when they are used as the destination |
Create a slot for each role and group | Selecting this option will stipulate that roles and groups are not resolved to users and when the Create a slot for each destination option is selected, one slot will be created for each role and group | Select how the roles should be treated when they are used as the destination |
Keep roles synchronized | Keeps the roles synchronized when a role has been used as a destination | Select whether the roles should be kept synchronized |
After selecting Plan per slot (no destination) on the previous screen the following screen will be displayed:
Fig.2 Default Activity Wizard - Destination Rule Options wizard screen
Feature | Description | How to use it |
---|---|---|
Select the number of slots to be created | Will create the specified number of slots enabling the server to start as many instances, see Destination Rule Options | Select the check box to select this option if relevant and specify the number of slots in the supplied text box |
Initialization Data (Optional) | Configures the Initialization Data, see Destination Rule Options | Type in the relevant Initialization Data in the text box alternatively click on the ellipse button and browse to the relevant Field that should be used |
Select a list field to determine how many slots should be created | Specifies a list field that should be used to dynamically specify the number of slots that should be created, see Destination Rule Options | Click on the ellipse button and browse to the relevant list field |
If the Plan per slot (no destinations) Destination Rule option is selected, and multiple slots may potentially be created, it is advised to set up a Succeeding Rule to ensure that all slots have completed before the activity continues. In the event where a Succeeding Rule has not been set up for this purpose, only the first slot will be taken into account and the activity will continue as soon as the first slot has completed. |
It is important to note the impact of the options selected in the Destination Rule setup will have on execution of the rules and in turn on performance of the system. Take the following scenario as an example:
In this scenario, the Destination Set will be resolved, i.e. the Role will be brought down to the user level and each user will be added as a Destination. All events (defined within the Activity) will execute once for each member of the Role. Only 3 slots are required to be completed, but 30 events will execute at once. This could have an impact on the performance of the system and it is therefore advised to rather use the Plan Just Once Destination Rule.
When using the Plan Just Once Destination Rule in this scenario, only one activity instance destination is instantiated. All events / modules contained in the instance will only execute once. Only one task item is created and rights assigned to the single task item. All destination users receive their worklist items simultaneously. The number of slots will be set on the Activity Instance Destination, and all the Destinations defined in the Destination Rule will be copied to the Destinations collection of the Activity Instance Destination.
Because only one Activity Instance Destination exists, the Client Event will only execute once. There will only be one Worklist header and one Serial number. So all destinations will have access to the same serial number (Activity Instance Destination). Each response from the user will update the Activity Instance Destination XML/data fields. A slot will be created for that user and the XML/data field values will be copied to the slot and depending on the action performed, the slot will be completed, or remain Open to the user.
The activity instance will complete when all slots are completed or when the succeeding rule is true.